package com.ht.module.bus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ht.module.bus.vo.ShowUserVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;


/**
 * <p>
 * 房间表
 * </p>
 *
 * @author hejialun
 * @since 2024-11-25
 */

@TableName("bus_room")
@Data
@Accessors(chain = true)
public class BusRoom{

	@Schema(description = "房间id")
    @TableId(type = IdType.AUTO)
    private Integer roomId;


	@Schema(description = "计分模式,0:统一记，1:给分模式，2：总账模式")
    private Integer mode;

	@Schema(description = "台费规则：0：无台费，1：抽分模式，2：百分比")
    private Integer taiwanFee;

	@Schema(description = "台费规则:1的时候 满多少分抽")
    private BigDecimal fullVal;

	@Schema(description = "台费规则:1的时候 达到满足分抽多少分")
    private BigDecimal deductVal;


	@Schema(description = "台费规则百分比值")
    private Integer percentValue=0;


    @Schema(description = "房间是否开始，0：未开始，1：开始；2：结束")
    private Integer isStart;


    @Schema(description = "当前台费")
    private BigDecimal taiwanFeeValue=new BigDecimal(0);

    @Schema(description = "最大台费")
    private BigDecimal taiwanFeeMax=new BigDecimal(0);

    @Schema(description = "积分池")
    private BigDecimal scorePool=new BigDecimal(0);


	@Schema(description = "创建时间")
    private LocalDateTime createDate;

	@Schema(description = "创建人")
    private String createUser;

	@Schema(description = "修改时间")
    private LocalDateTime updateDate;

	@Schema(description = "修改人")
    private String updateUser;

    @Schema(description = "房间用户集合")
    @TableField(exist = false)
    private List<ShowUserVo> roomUsers=new ArrayList<>();

}
